package chapter11.section3;

import java.util.LinkedList;

public class QueueMachine {
    private final LinkedList<Transaction> queue = new LinkedList<Transaction>();

    public boolean isEmpty() {
        return queue.isEmpty();
    }

    public Transaction get() {
        Transaction tran = queue.poll();
        return tran;
    }

    public void add(Transaction tran) {
        this.queue.add(tran);
    }
}

